<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>webSocket客户端</title>
</head>
<body>
<p>【fromUserId】：<div><input id="fromUserId" name="fromUserId" type="text" value="pwj"></div></p>
<p>【toUserId】：<div><input id="toUserId" name="toUserId" type="text" value="yxw"></div></p>
<p>【message】：<div><input id="message" name="message" type="text" value="hello websocket"></div></p>
<p>【操作】：<div><a  href = " javascript: void ( 0 )" onclick="openSocket()">开启socket</a></div></p>
<p>【操作】：<div><a  href = " javascript: void ( 0 )" onclick="closeSocket()">关闭socket</a></div></p>
<p>【操作】：<div><a  href = " javascript: void ( 0 )" onclick="sendMessage()">发送消息</a></div></p>
<hr>
<div style="width: 500px;height: 500px;border: red 1px solid" id="messageDiv">
</div>
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/common.js"></script>
</body>

</html>